package com.jxwifi.cloud.quickclean.order;

import android.os.Bundle;
import android.support.design.widget.TabLayout;
import android.support.v4.app.FragmentManager;
import android.support.v4.view.ViewPager;
import android.view.View;

import com.idroid.utils.NoDoubleClickListener;
import com.jxwifi.cloud.quickclean.R;
import com.jxwifi.cloud.quickclean.app.ClientBasicActivity;
import com.jxwifi.cloud.quickclean.utils.TitleClient;

import butterknife.Bind;
import butterknife.ButterKnife;

/**
 * 我的订单
 * Created by Administrator on 2019/6/12.
 */

public class MyOrderActivity extends ClientBasicActivity implements OrderView{

    @Bind(R.id.tl_quick_tabLayout)
    TabLayout mTlQuickTabLayout;
    @Bind(R.id.quick_viewPager)
    ViewPager mQuickViewPager;

    private OrderPresenter mPresenter;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_my_order);
        ButterKnife.bind(this);
        openEventBus();
        mPresenter=new OrderPresenter(mBaseContext,this);
        initHead();
        initView();
    }

    private void initHead() {
        TitleClient holder = new TitleClient(ButterKnife.findById(this, R.id.lin_client_title));
        holder.defineTitle("我的订单");
        holder.defineLeft(new NoDoubleClickListener() {
            @Override
            protected void onNoDoubleClick(View v) {
                onBackPressed();
            }
        });
    }

    public void initView(){
        mPresenter.fgView();
    }

    @Override
    public FragmentManager getFrgaments() {
        return getSupportFragmentManager();
    }
    @Override
    public ViewPager getPage() {
        return mQuickViewPager;
    }

    @Override
    public TabLayout getTabLayouts() {
        return mTlQuickTabLayout;
    }


    @Override
    protected void onResume() {
        super.onResume();
    }
}
